import { defHttp } from '@/utils/http/axios';

const baseUrl = '/devices';

enum Api {
  searchDevices = `${baseUrl}/searchDevices`,
  createDevices = `${baseUrl}/createDevices`,
  deleteDevices = `${baseUrl}/deleteDevices`,
  updateDevices = `${baseUrl}/updateDevices`,
}

// 查询所有
export const getsearchDevices = (params?: Recordable) =>
  defHttp.post({ url: Api.searchDevices, params });
// 创建
export const createDevices = (params?: Recordable) =>
  defHttp.post({ url: Api.createDevices, params });
// 删除
export const deleteDevices = (params?: Recordable) =>
  defHttp.post({ url: Api.deleteDevices, params });
// 修改
export const updateDevices = (params?: Recordable) =>
  defHttp.post({ url: Api.updateDevices, params });
